<template>
  <div class="app-container" alient:center>
    <van-grid :column-num="3">
      <van-grid-item
        v-for="item in tableData"
        :key="item.path"
        :icon="item.meta.icon"
        :text="item.meta.title"
        @click="handleSelectionChange(item)"
      />
    </van-grid>

    <van-grid :column-num="1">
      <van-grid-item icon="home-o" text="订单核销"  @click="handleScanqrCode()"/>
    </van-grid>
  </div>
</template>


<script>
export default {
  data() {
    return {
      tableData: [
        {
          path: "/addProduct",
          component: () => import("@/views/pms/product/edit"),
          hidden: true,
          meta: { title: "商品添加", icon: "fire-o" }
        },
        {
          path: "/shopAuthentication",
          component: () => import("@/views/shop/authentication/index"),
          hidden: true,
          meta: { title: "店铺认证", icon: "shop-o" }
        },
        {
          path: "/tabCategory",
          component: () => import("@/views/pms/tabCategory/index"),
          hidden: true,
          meta: { title: "商品/分类管理", icon: "cluster-o" }
        },
        {
          path: "/product/verify",
          component: () => import("@/views/pms/product/verify"),
          hidden: true,
          meta: { title: "商品审核", icon: "user-o" }
        },
        {
          path: "/sellerOrder",
          component: () => import("@/views/oms/seller/index"),
          hidden: true,
          meta: { title: "出门单", icon: "orders-o" }
        },
         {
          path: "/blance",
          component: () => import("@/views/blance/index"),
          hidden: true,
          meta: { title: "余额明细", icon: "orders-o" }
        },
       
      ]
    };
  },
  methods: {
    handleSelectionChange(val) {
      this.$router.push({ path: val.path });
    },
    handleScanqrCode(){
      
      window.webkit.messageHandlers.qrscan.postMessage(
              "webdebug。goBackaction"
            );
    }
  }
};
</script>

<style scoped>
.item {
  padding: 10px, 10px, 10px, 10px;
  background-color: beige;
  width: 30%;
  height: 60px;
}
</style>
